#include<iostream>
#include"CppMacro.h"
using namespace std;

class myexception: public exception
{
  virtual const char* what() const throw()
  {
    return "My exception happened";
  }
} myex;

int main_cppmacro(int argc,char **argv)
{
	cout<<__FILE__<<endl;
	cout<<__LINE__<<endl;
	cout<<__DATE__<<endl;
	cout<<__TIME__<<endl;


	try
	{
		throw 20;
	}
	catch (int e)
	{
		cout << "An exception occurred. Exception Nr. " << e << endl;
	}

	try
	{
		throw myex;
	}
	catch (exception& e)
	{
		cout << e.what() << endl;
	}

	return 0;
}